// TOWN DIALOGUE SCRIPT
//    Town 3: Lizard Tunnels

// This is the dialogue for this town.
// You can use states numbered from 1 to 99.

begintalkscript;
variables;

//**Jeff**

begintalknode 1;
	state = -1;
	nextstate = 1;
	personality = 9;
	question = "Jeff";
	text1 = "The soldier has calmed down a bit, but he's obviously terrified to be here.";
	text2 = "_Hi. I'm Jeff. Is it safe to leave?_";
	action = INTRO;
	text5 = "Jeff looks relieved that you're not something that's about to kill him.";
	text6 = "_Is it safe to leave yet?_";

begintalknode 2;
	state = 1;
	nextstate = 2;
	condition = get_flag(100,3) == 0;
	question = "What are you doing here?";
	text1 = "_I was with a group that came in here to try to slay the dragon. From what I saw, we failed. Miserably._";
	action = SET_SDF 100 3 1;

begintalknode 3;
	state = 2;
	question = "What happened?";
	text1 = "_Oh, it was horrible! We had barely entered the cave before getting ambushed by lizards, and they cut off the exit. We did alright at first, and we had the upper hand, but then more came. And then even more._";
	text2 = "_I guess the dragon must have eventually heard the commotion. It appeared, almost as if out of nowhere. Then, it was all over._";
	text3 = "_Derek and Garrett died immediately, when the dragon blew flame at them. Kurtis did a handspring over a nearby lizard and nearly escaped further into the cave, but the dragon caught him too, before he got far._";
	text4 = "_Then the dragon turned toward Captain Baker, the leader of our quest. He got him with one of his claws and sent him flying into a wall._";
	text5 = "_Then he started following the others, who were trying to escape further into the cave. I took the opportunity to try to drag Captain Baker to safety, but the entrance was still blocked. We couldn't escape from the cave._";
	text6 = "_I had no choice but to find a place to hide, and hope nothing found us._";
	text7 = "He is silent for a while before speaking again. _I bet the others are dead by now, too. They couldn't have survived that dragon._";

begintalknode 4;
	state = 1;
	question = "Why don't you come with us?";
	text1 = "_To go slay the dragon? I can't. I have to stay here and protect Captain Baker. Plus, I'm too tired to be of any use to you. Just go, and please come tell me when there's a clear path to the exit._";

begintalknode 5;
	state = 1;
	question = "It's not safe to leave yet.";
	text1 = "Jeff looks disappointed, and still quite frightened. _Please, come back and tell us when it's safe to go._";

begintalknode 6;
	state = 1;
	condition = get_flag(200,3) < 11;
	question = "It is safe to leave.";
	text1 = "Jeff goes to the threshold and peeks out, then hastily comes back in. _I don't think it is. I still hear hissing from the entrance. We'd never make it out._";

begintalknode 7;
	state = 1;
	condition = get_flag(200,3) == 11;
	question = "It's safe to leave now.";
	text1 = "Jeff goes to the threshold and peeks out. He quickly comes back. _Thank you. You've saved our lives today._";
	text2 = "With that, he hoists Captain Baker on to his shoulder and hurries out of the room.";
	action = END_TALK;
	code = 
		erase_char(6);
		erase_char(7);
		award_party_xp(20,15);
		set_flag(101,3,1);
		break;

begintalknode 8;
	state = -1;
	question = "Captain Baker";
	text1 = "This man is unconscious, but obviously in pain. He moans from time to time, but he says nothing comprehensible.";